package com.hzhk.happyrent.ui.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.hzhk.happyrent.R;
import com.hzhk.happyrent.utils.ViewHolder;


public class ProductByStagesAdapter extends BaseAdapter<String> {

	Context context;
	private String choosed="";

	public void setChoosed(String choosed){
		this.choosed=choosed;
	}

	public ProductByStagesAdapter(Context context) {
		super(context);
		this.context = context;
	}

	@Override
	public View getView(final int position, View convertView, ViewGroup parent) {
		if (convertView == null) {
			convertView = mInflater.inflate(R.layout.menu_select_city_item,
					null);
		}
		TextView description = ViewHolder.get(convertView, R.id.menu_city_tv);

		description.setText(getItem(position));

		if(choosed.equals(getItem(position))){
			description.setTextColor(context.getResources().getColor(R.color.tab_red));
		}else{
			description.setTextColor(context.getResources().getColor(R.color.black_80));
		}
		return convertView;
	}

}
